<template>
  <div>
    <div class="header">
        <div class="pay">
            <router-link to="/userAdd/userPay" active-class="active" >支出</router-link>
        </div>
        <div class="get">
            <router-link to="/userAdd/userGet" active-class="active" >收入</router-link>
        </div>
        <div class="cancel" @click="cancel">
            <a>取消</a>
        </div>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
    name: "UserAdd",
    methods:{
        cancel(){
            this.$router.push('/userHome/homePage')
        }
    }
}
</script>

<style scoped>
    .header{
        height: 12vh;
        background-color: royalblue;
    }
    .pay{
        height: 10vh;
        width: 11vw;
        margin-left: 35vw;
        /* background-color: black; */
        color: white;
        line-height: 12vh;
        font-size: 20px;
        float: left;
        border: 0;
        
    }
    .get{
        height: 10vh;
        width: 11vw;
        margin-left: 10vw;
        /* background-color: black; */
        color: white;
        line-height: 12vh;
        font-size: 20px;
        float: left;
        
        border: 0;
    }
    .cancel{
        position: absolute;
        top: 5vh;
        color: white;
        right:4vw;
    }
    .active{
        border-bottom: solid white 2px;
    }

    a{
        text-decoration: none;
    }
    a:visited{
        color: white;
    }
</style>